
<html>
<head>
<meta name="GENERATOR" content="Microsoft Visual Studio 6.0">


<script language="javascript1.2">
function DateCheck(frmMo, frmDy, frmYr)
{
  var returnCode;
  var cdtStr, fdtStr;
  var cdt = new Date();
  //cdtStr = cdt.getYear().toString() + ZeroPad(cdt.getMonth() + 1, 2).toString() + ZeroPad(cdt.getDate(), 2).toString()
  cdtStr = 20070205
  fdtStr = frmYr + ZeroPad(frmMo, 2) + ZeroPad(frmDy, 2);
  var frmDate = ZeroPad(frmMo, 2) + '/' + ZeroPad(frmDy, 2) + '/' + frmYr;
  compareDate = new Date(frmDate);
  var newDate = ZeroPad(compareDate.getMonth() + 1, 2) + '/' + ZeroPad(compareDate.getDate(), 2) + '/' + frmYr;
  if (frmDate != newDate)
  {
    alert(frmDate + ' is not a valid date!');
    returnCode = false;
  }
  else
  {
    if (fdtStr > cdtStr)
    {
      alert(frmDate + ' is an invalid BirthDate (greater than current date).\n\nYou have entered: ' + frmDate + ' as a birthdate.\n' + cdtStr + ' is the current date.\n');
      returnCode = false;
    }
    else
      returnCode = true;
  }
  
  return (returnCode);
}

function AutoTabCheck(obj, frmObj)
{
  if (obj.value.length == obj.maxLength)
  {
    start = obj.id.length - 2;
    incre = parseInt(obj.id.substr(start, 2));    
    NewIDnum = ZeroPad(incre + 1, 2);
    NewID = obj.id.substr(0, start) + NewIDnum;
    newObj = eval(frmObj.id + "." + NewID);
    newObj.focus();
  }
}

function CancelOutWizard()
{
  var leaving = confirm("Clicking [OK] will exit the wizard without submitting, all data will be lost.\nClick [Cancel] to remain here.");
  if (leaving)
    window.location.replace('http://pacecares.fhsc.com/default.asp');
}

function allMoney(num)
{
  numSet = "0123456789.";
  for (x=0;x<=num.length;x++)
  {
    charX = num.substr(x, 1);
    if (numSet.indexOf(charX) == -1)
    {
      leftS = num.substring(0, x);
      rightS = num.substr(x+1);
      num = leftS + rightS;
      x--;
    }
  }
  return(num);  
}

function allNum(num)
{
  numSet = "0123456789";
  for (x=0;x<=num.length;x++)
  {
    charX = num.substr(x, 1);
    if (numSet.indexOf(charX) == -1)
    {
      leftS = num.substring(0, x);
      rightS = num.substr(x+1);
      num = leftS + rightS;
      x--;
    }
  }
  return(num);  
}

function isAlphaNum(str)
{
  alphaSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  newstr = str.toUpperCase();
  for (x=0; x<newstr.length; x++)
  {
    if (alphaSet.indexOf(newstr.substr(x, 1)) == -1)
    {
      x = newstr.length;
      return false;
    }
  }
  return true;
}

function ZeroPad(str, pre)
{
  var x;
  var workstr;
  for (x=1; x<pre; x++)
  {
    workstr = "0".concat("0");
  }
  return (workstr.concat(str).substr(workstr.concat(str).length-pre));
}

function Right(str, retlen)
{
  if (retlen >= str.length)
    return (str);
  else
    return (str.substr(str.length - retlen));
}

function HighlightField(FldStyle)
{
  FldStyle.borderColor = "blue";
  FldStyle.backgroundColor = "LightSteelBlue";
}

function UnHighlightField(FldStyle)
{
  FldStyle.borderColor = "";
  FldStyle.backgroundColor = "";
}

function AddTotalsthenSubmit(j)
{
  xx = 0, yrvalue = 0, spvalue = 0;
  while (xx<7)
  {
    xx++;
    tot = eval("document.frmPace.Tot_Income" + xx);
    sp = eval("document.frmPace.Sp_Income" + xx);
    yr = eval("document.frmPace.Yr_Income" + xx);
    tvalue = parseFloat(yr.value) + parseFloat(sp.value);
    yrvalue = yrvalue + parseFloat(yr.value);
    spvalue = spvalue + parseFloat(sp.value);
    tot.value = Math.round(tvalue * Math.pow(10, 2)) / Math.pow(10, 2);
    if (xx == 6)
    {
      document.frmPace.Yr_Income7.value = Math.round(yrvalue * Math.pow(10, 2)) / Math.pow(10, 2);
      document.frmPace.Sp_Income7.value = Math.round(spvalue * Math.pow(10, 2)) / Math.pow(10, 2);
    }
  }  
}

function IndividualEdits(Indv, obj, NoFocus)
{
  var Status = true;
  frm6Obj = document.frmSect06;
  
  switch(Indv)
  {
    case "ssn":
      val = obj.value;
      if (isAlphaNum(val))
      {
        obj.value = val;
        if (val.length > 1 && val.length != 9)
        {
          alert('SSN can contain a combination 9 numerics and/or letters.');
          if (!NoFocus)
            obj.focus();
          Status = false;
        }
      }
      else
      {
        Status = false;
      }
      break;

    case "areacode":
      val = obj.value;
      newNum = allNum(val);
      obj.value = newNum;
      if (newNum.length > 1 && newNum.length != 3)
      {
        alert('area code must contain 3 numerics.');
        if (!NoFocus)
          obj.focus();
        Status = false;
      }
      break;

    case "phone":
      val = obj.value;
      newNum = allNum(val);
      obj.value = newNum;
      if (newNum.length > 1 && newNum.length != 7)
      {
        alert('phone trunk must contain 7 numerics.');
        if (!NoFocus)
          obj.focus();
        Status = false;
      }
      break;

    case "zip":
      val = obj.value;
      newNum = allNum(val);
      obj.value = newNum;
      if (newNum.length > 1 && newNum.length != 5)
      {
        alert('zip code must contain 5 numerics.');
        obj.focus();
        Status = false;
      }
      break;
      
    case "zip4":
      val = obj.value;
      newNum = allNum(val);
      obj.value = newNum;
      if (newNum.length > 1 && newNum.length != 4)
      {
        alert('zip code suffix must contain 4 numerics.');
        obj.focus();
        Status = false;
      }
      break;
      
    case "money":
      val = obj.value;
      newNum = allMoney(val);
      obj.value = newNum;
      if (newNum.length > 7)
      {
        alert('Money field can contain no more than 7 numerics including decimals.');
        obj.focus();
        Status = false;
      }
      break;
      
    case "divYear":
      val = obj.value;
      if (frm6Obj.Yr_mstat[0].checked || frm6Obj.Yr_mstat[1].checked)
      {
        obj.value = '';
      }
      break;
      
    case "marStat":
      if (frm6Obj.Yr_mstat[0].checked || frm6Obj.Yr_mstat[1].checked)
      {
        frm6Obj.DSyear.value = '';
      }
      break;
    default:
  }
  
  return Status;
}

function HelpWindows(Proof)
{
  switch(Proof)
  {
    case "Age":
      alert("Valid Proofs of Age:\n" +
            "(note: The following examples are acceptable documents but not limited to:)\n\n" +
            "- Birth Certificate/foreign birth certificate\n" +
            "- Baptismal Record\n" +
            "- Valid Driver's License\n" +
            "- Social Security Document\n" +
            "- Insurance Policy (not an insurance application)\n" +
            "- Photocopy of previous PACE/PACENET card\n" +
            "- Passport\n" +
            "- Military Discharge Papers");
      break;
    case "Addr":
      alert("Valid Proofs of Residency:\n" +
            "(note: The following examples are acceptable documents but not limited to:)\n\n" +
            "- Valid Driver's License/Owner's Card\n" +
            "- Utility reciepts\n" +
            "- Pre-printed rent reciepts\n" +
            "- Social Security correspondence\n" +
            "- Nursing Home residents may submit a letter on the facility's stationery stating the admission date and signed by the director or administrator\n" +
            "- Local, state, or federal income tax return with a pre-printed name and address label");
      break;
    case "Income":
      alert("Valid Proofs of Income:\n" +
            "(note: The following examples are acceptable documents but not limited to:)\n\n" +
            "- PA-40 or an IRS 1040 income tax return\n" +
            "- Income tax return schedules (B, C, D, etc.)\n" +
            "- Social Security 1099 form (only document accepted for Social Security income\n" +
            "- Benefit letter stating SSI payments\n" +
            "- RRB-1099 and RRB-1099R forms (Railroad)\n" +
            "- Pension/Annuities/IRA 1099 forms\n" +
            "- W-2 forms (wages)\n" +
            "- Bank statement (last month of previous year)\n" +
            "- Court Order");
      break;
    default:
  }
}

function FieldFriendlyDisc(field)
{
  switch(field)
  {
    case "Yr_lastname":
      FriendlyName = "Applicant Last Name";
      break;
    case "Yr_firstname":
      FriendlyName = "Applicant First Name";
      break;
    case "Yr_address":
      FriendlyName = "Applicant Street Address";
      break;
    case "Yr_City":
      FriendlyName = "Applicant City";
      break;
    case "Yr_State":
      FriendlyName = "Applicant 2-digit State Code";
      break;
    case "Yr_zip01":
      FriendlyName = "Applicant 5-digit Zip Code";
      break;
    case "Yr_zip02":
      FriendlyName = "Applicant 4-digit Zip Code suffix";
      break;
    case "Yr_race":
      FriendlyName = "Applicant Ethnicity Code";
      break;
    case "Yr_rtype":
      FriendlyName = "Applicant Residence Type";
      break;
    case "Yr_Mo":
      FriendlyName = "Applicant Birth Month";
      break;
    case "Yr_Day":
      FriendlyName = "Applicant Birth Day of Month";
      break;
    case "Yr_Year":
      FriendlyName = "Applicant Birth Year";
      break;
    case "Yr_ssn":
      FriendlyName = "Applicant Social Security Number";
      break;
    case "Yr_phone01":
      FriendlyName = "Applicant 3-digit Area Code";
      break;
    case "Yr_phone7":
      FriendlyName = "Applicant 7-digit Telephone Number";
      break;
    case "Yr_mstat":
      FriendlyName = "Marital Status";
      break;
    case "Sp_lastname":
      FriendlyName = "Spouse Last Name";
      break;
    case "Sp_firstname":
      FriendlyName = "Spouse First Name";
      break;
    case "Sp_address":
      FriendlyName = "Spouse Street Address";
      break;
    case "Sp_City":
      FriendlyName = "Spouse City";
      break;
    case "Sp_State":
      FriendlyName = "Spouse 2-digit State Code";
      break;
    case "Sp_zip01":
      FriendlyName = "Spouse 5-digit Zip Code";
      break;
    case "Sp_zip02":
      FriendlyName = "Spouse 4-digit Zip Code suffix";
      break;
    case "Sp_race":
      FriendlyName = "Spouse Ethnicity Code";
      break;
    case "Sp_rtype":
      FriendlyName = "Spouse Residence Type";
      break;
    case "Sp_Mo":
      FriendlyName = "Spouse Birth Month";
      break;
    case "Sp_Day":
      FriendlyName = "Spouse Birth Day of Month";
      break;
    case "Sp_Year":
      FriendlyName = "Spouse Birth Year";
      break;
    case "Sp_ssn":
      FriendlyName = "Spouse Social Security Number";
      break;
    case "Sp_phone01":
      FriendlyName = "Spouse 3-digit Area Code";
      break;
    case "Sp_phone7":
      FriendlyName = "Spouse 7-digit Telephone Number";
      break;
    case "DSyear":
      FriendlyName = "Year of Divorce or Separation";
      break;
    case "yrPOA_name":
      FriendlyName = "Applicant Power of Attorney name";
      break;
    case "yrPOA_address":
      FriendlyName = "Applicant Power of Attorney address";
      break;
    case "yrPOA_city":
      FriendlyName = "Applicant Power of Attorney city";
      break;
    case "yrPOA_state":
      FriendlyName = "Applicant Power of Attorney state";
      break;
    case "yrPOA_zip01":
      FriendlyName = "Applicant Power of Attorney 5-digit Zip Code";
      break;
    case "yrPOA_zip02":
      FriendlyName = "Applicant Power of Attorney 4-digit Zip Code suffix";
      break;
    case "yrPOA_phone01":
      FriendlyName = "Applicant Power of Attorney area code";
      break;
    case "yrPOA_phone02":
      FriendlyName = "Applicant Power of Attorney 3-digit section of phone number";
      break;
    case "yrPOA_phone03":
      FriendlyName = "Applicant Power of Attorney 4-digit section of phone number";
      break;
    case "yrPOA_year":
      FriendlyName = "Applicant Power of Attorney Year Assigned";
      break;
    case "spPOA_name":
      FriendlyName = "Spouse Power of Attorney name";
      break;
    case "spPOA_address":
      FriendlyName = "Spouse Power of Attorney address";
      break;
    case "spPOA_city":
      FriendlyName = "Spouse Power of Attorney city";
      break;
    case "spPOA_state":
      FriendlyName = "Spouse Power of Attorney state";
      break;
    case "spPOA_zip01":
      FriendlyName = "Spouse Power of Attorney 5-digit Zip Code";
      break;
    case "spPOA_zip02":
      FriendlyName = "Spouse Power of Attorney 4-digit Zip Code suffix";
      break;
    case "spPOA_phone01":
      FriendlyName = "Spouse Power of Attorney area code";
      break;
    case "spPOA_phone02":
      FriendlyName = "Spouse Power of Attorney 3-digit section of phone number";
      break;
    case "spPOA_phone03":
      FriendlyName = "Spouse Power of Attorney 4-digit section of phone number";
      break;
    case "spPOA_year":
      FriendlyName = "Spouse Power of Attorney Year Assigned";
      break;
    case "Scan01":
      FriendlyName = "Valid Proof of Age Image";
      break;
    case "Scan02":
      FriendlyName = "Valid Proof of Residence Image";
      break;
    case "Scan03":
      FriendlyName = "Valid Proof of Income Image";
      break;
    default:
      FriendlyName = field + ' [discription missing]';
  }
  
  return (FriendlyName + ' is a required field.');
}

function RequiredFields(page)
{
  errmsg = "";
  blnReqFlds = false;
  Statchecked = false;

  switch(page)
  {
    case "002":    
      frmObj = document.frmSect02;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "Yr_lastname":
          case "Yr_firstname":
          case "Yr_address":
          case "Yr_City":
          case "Yr_State":
          case "Yr_zip01":
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
            }
            break;
          default:
        }
      } 
      break;
    case "003":    
      frmObj = document.frmSect03;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "Yr_Mo":
          case "Yr_Day":
          case "Yr_Year":
            if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
            }
            break;
          case "Yr_BDate":
            if (frmObj.Yr_Mo.value > 0 && frmObj.Yr_Day.value > 0 && frmObj.Yr_Year.value > 0)
            {
              if (DateCheck(frmObj.Yr_Mo.value, frmObj.Yr_Day.value, frmObj.Yr_Year.value) == false)
                blnReqFlds = true;
            }
            break;
          case "Yr_ssn":
            frmObj.elements[i].value = frmObj.Yr_ssn01.value + frmObj.Yr_ssn02.value + frmObj.Yr_ssn03.value;
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.Yr_ssn01.style);
              HighlightField(frmObj.Yr_ssn02.style);
              HighlightField(frmObj.Yr_ssn03.style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.Yr_ssn01.style);
              UnHighlightField(frmObj.Yr_ssn02.style);
              UnHighlightField(frmObj.Yr_ssn03.style);
              if (IndividualEdits('ssn', frmObj.elements[i], true) == false)
              {
                frmObj.Yr_ssn01.focus();
                blnReqFlds = true;
              }
            }
            break;
          /* 09/01/2002 - Now, remove requirement on AreaCode and Phone
          case "Yr_phone01":
            if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
              if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
              {
                frmObj.elements[i].focus();
                blnReqFlds = true;
              }
            }
            break;
          */
          case "Yr_phone7":          
            frmObj.elements[i].value = frmObj.Yr_phone02.value + frmObj.Yr_phone03.value;
            if (IndividualEdits('phone', frmObj.elements[i], true) == false)
            {
              frmObj.Yr_phone02.focus();
              blnReqFlds = true;
            }
            break;
          /*
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.Yr_phone02.style);
              HighlightField(frmObj.Yr_phone03.style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.Yr_phone02.style);
              UnHighlightField(frmObj.Yr_phone03.style);
              if (IndividualEdits('phone', frmObj.elements[i], true) == false)
              {
                frmObj.Yr_phone02.focus();
                blnReqFlds = true;
              }
            }
            break;
          */
          default:
        }
      }
      break;
    case "004":
      frmObj = document.frmSect04;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "Sp_lastname":
          case "Sp_firstname":
          case "Sp_address":
          case "Sp_City":
          case "Sp_State":
          case "Sp_zip01":
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
            }
            break;
          default:
        }
      } 
      break;
    case "005":
      frmObj = document.frmSect05;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "Sp_Mo":
          case "Sp_Day":
          case "Sp_Year":
            if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
            }
            break;
          case "Sp_BDate":
            if (frmObj.Sp_Mo.value > 0 && frmObj.Sp_Day.value > 0 && frmObj.Sp_Year.value > 0)
            {
              if (DateCheck(frmObj.Sp_Mo.value, frmObj.Sp_Day.value, frmObj.Sp_Year.value) == false)
                blnReqFlds = true;
            }
            break;
          case "Sp_ssn":
            frmObj.elements[i].value = frmObj.Sp_ssn01.value + frmObj.Sp_ssn02.value + frmObj.Sp_ssn03.value;
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.Sp_ssn01.style);
              HighlightField(frmObj.Sp_ssn02.style);
              HighlightField(frmObj.Sp_ssn03.style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.Sp_ssn01.style);
              UnHighlightField(frmObj.Sp_ssn02.style);
              UnHighlightField(frmObj.Sp_ssn03.style);
              if (IndividualEdits('ssn', frmObj.elements[i], true) == false)
              {
                frmObj.Sp_ssn01.focus();
                blnReqFlds = true;
              }
            }
            break;
          /* 09/01/2002 - Now, remove requirement on AreaCode and Phone
          case "Sp_phone01":
            if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
              if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
              {
                frmObj.elements[i].focus();
                blnReqFlds = true;
              }
            }
            break;
          */         
          case "Sp_phone7":
            frmObj.elements[i].value = frmObj.Sp_phone02.value + frmObj.Sp_phone03.value;
            if (IndividualEdits('phone', frmObj.elements[i], true) == false)
            {
              frmObj.Sp_phone02.focus();
              blnReqFlds = true;
            }
            break;
          /*
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.Sp_phone02.style);
              HighlightField(frmObj.Sp_phone03.style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.Sp_phone02.style);
              UnHighlightField(frmObj.Sp_phone03.style);
              if (IndividualEdits('phone', frmObj.elements[i], true) == false)
              {
                frmObj.Sp_phone02.focus();
                blnReqFlds = true;
              }
            }
            break;
          */
          default:
        }
      }
      break;
      
    case "006":
      frmObj = document.frmSect06;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "Yr_rtype":
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
            }
            break;
          default:
            switch (frmObj.elements[i].id)
            {
              case "Yr_mstat":
                if (frmObj.elements[i].value.length < 1)
                {
                  errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
                  HighlightField(frmObj.elements[i].style);
                  blnReqFlds = true;
                }
                else
                {
                  UnHighlightField(frmObj.elements[i].style);
                }
                break;
              case "DSyear":
                if (frmObj.Yr_mstat.value == '3' || frmObj.Yr_mstat.value == '4')
                {
                  if (frmObj.elements[i].value.length < 1)
                  {
                    errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
                    HighlightField(frmObj.elements[i].style);
                    blnReqFlds = true;
                  }
                  else
                  {
                    UnHighlightField(frmObj.elements[i].style);
                  }
                }
              default:
            }
        }
      }
      break;
    case "007":
      frmObj = document.frmSect07;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "Sp_rtype":
            if (frmObj.elements[i].value.length < 1)
            {
              errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
              HighlightField(frmObj.elements[i].style);
              blnReqFlds = true;
            }
            else
            {
              UnHighlightField(frmObj.elements[i].style);
            }
            break;
          default:
        }
      }
      break;
    case "008":
      frmObj = document.frmSect08;
      Inc01 = frmObj.Tot_Income1;
      Inc02 = frmObj.Tot_Income2;
      Inc03 = frmObj.Tot_Income3;
      Inc04 = frmObj.Tot_Income4;
      Inc05 = frmObj.Tot_Income5;
      Inc06 = frmObj.Tot_Income6;
      spInc01 = frmObj.sp_Tot_Income1;
      spInc02 = frmObj.sp_Tot_Income2;
      spInc03 = frmObj.sp_Tot_Income3;
      spInc04 = frmObj.sp_Tot_Income4;
      spInc05 = frmObj.sp_Tot_Income5;
      spInc06 = frmObj.sp_Tot_Income6;
      tvalue = 0;
      tvalue = tvalue + parseFloat(Inc01.value) + parseFloat(Inc02.value);
      tvalue = tvalue + parseFloat(Inc03.value) + parseFloat(Inc04.value);
      tvalue = tvalue + parseFloat(Inc05.value) + parseFloat(Inc06.value);
      tvalue = tvalue + parseFloat(spInc01.value) + parseFloat(spInc02.value);
      tvalue = tvalue + parseFloat(spInc03.value) + parseFloat(spInc04.value);
      tvalue = tvalue + parseFloat(spInc05.value) + parseFloat(spInc06.value);
      
      frmObj.Tot_Income7.value = Math.round(tvalue * Math.pow(10, 2)) / Math.pow(10, 2);
      blnReqFlds = false;
      break;
      
    case "888":
      //There is a bug here.  Since boolean value can be
      //changed on just either Applicant or spouse being
      //correct, only having one correct can bypass the check.
      //SIW  07.21.2004
      frmObj = document.frmSect888;
      if ((frmObj.CertFirstA.value == frmObj.hdn888AF.value) && (frmObj.CertLastA.value == frmObj.hdn888AL.value) && (frmObj.CertMiA.value == frmObj.hdn888AM.value))
      {
        blnReqFlds = false;
      }
      else
      {
        errmsg = errmsg + "The entered name must exactly match that entered for the Applicant." + "\n";
        blnReqFlds = true;
      }

      if (frmObj.hdn888SF.value.length > 0)
      {
        if ((frmObj.CertFirstS.value == frmObj.hdn888SF.value) && (frmObj.CertLastS.value == frmObj.hdn888SL.value) && (frmObj.CertMiS.value == frmObj.hdn888SM.value))
        {
          blnReqFlds = false;
        }
        else
        {
          errmsg = errmsg + "The entered name must exactly match that entered for the Spouse." + "\n";
          blnReqFlds = true;
        }
      }
      break;
      
    case "009":
      frmObj = document.frmSect09;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "yrPOA_check":
            if (frmObj.yrPOA_check.checked)
            {
              if (frmObj.yrPOA_name.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_name.id) + "\n";
                HighlightField(frmObj.yrPOA_name.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_name.style);
              }              
              if (frmObj.yrPOA_address.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_address.id) + "\n";
                HighlightField(frmObj.yrPOA_address.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_address.style);
              }
              if (frmObj.yrPOA_city.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_city.id) + "\n";
                HighlightField(frmObj.yrPOA_city.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_city.style);
              }
              if (frmObj.yrPOA_state.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_state.id) + "\n";
                HighlightField(frmObj.yrPOA_state.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_state.style);
              }
              if (frmObj.yrPOA_zip01.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_zip01.id) + "\n";
                HighlightField(frmObj.yrPOA_zip01.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_zip01.style);
              }
              //yrPOAyr = frmObj.yrPOA_year;
              //valYear = yrPOAyr.options[yrPOAyr.selectedIndex].value;
              //if (valYear.length < 1)
              //{
              //  errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_year.id) + "\n";
              //  HighlightField(frmObj.yrPOA_year.style);
              //  blnReqFlds = true;                
              //}
              //else
              //{
              //  UnHighlightField(frmObj.yrPOA_year.style);
              //}
              /*
              if (frmObj.yrPOA_phone01.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_phone01.id) + "\n";
                HighlightField(frmObj.yrPOA_phone01.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_phone01.style);
              }
              if (frmObj.yrPOA_phone02.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_phone02.id) + "\n";
                HighlightField(frmObj.yrPOA_phone02.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_phone02.style);
              }
              if (frmObj.yrPOA_phone03.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_phone03.id) + "\n";
                HighlightField(frmObj.yrPOA_phone03.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.yrPOA_phone03.style);
              }
            */
            }
            break;
          case "yrPOA_phone10":
            frmObj.elements[i].value = frmObj.yrPOA_phone01.value;
            if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
            {
              frmObj.yrPOA_phone01.focus();
              blnReqFlds = true;
            }
            frmObj.elements[i].value = frmObj.yrPOA_phone02.value + frmObj.yrPOA_phone03.value;
            if (IndividualEdits('phone', frmObj.elements[i], true) == false)
            {
              frmObj.yrPOA_phone02.focus();
              blnReqFlds = true;
            }
            if (blnReqFlds == false)
              frmObj.elements[i].value = frmObj.yrPOA_phone01.value + frmObj.yrPOA_phone02.value + frmObj.yrPOA_phone03.value;
            break;
          default:
        }
      } 
      break;
    case "010":    
      frmObj = document.frmSect10;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "spPOA_check":
            if (frmObj.spPOA_check.checked)
            {
              if (frmObj.spPOA_name.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_name.id) + "\n";
                HighlightField(frmObj.spPOA_name.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_name.style);
              }              
              if (frmObj.spPOA_address.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_address.id) + "\n";
                HighlightField(frmObj.spPOA_address.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_address.style);
              }
              if (frmObj.spPOA_city.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_city.id) + "\n";
                HighlightField(frmObj.spPOA_city.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_city.style);
              }
              if (frmObj.spPOA_state.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_state.id) + "\n";
                HighlightField(frmObj.spPOA_state.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_state.style);
              }
              if (frmObj.spPOA_zip01.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_zip01.id) + "\n";
                HighlightField(frmObj.spPOA_zip01.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_zip01.style);
              }
              //spPOAyr = frmObj.spPOA_year;
              //valYear = spPOAyr.options[spPOAyr.selectedIndex].value;
              //if (valYear.length < 1)
              //{
              //  errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_year.id) + "\n";
              //  HighlightField(frmObj.spPOA_year.style);
              //  blnReqFlds = true;                
              //}
              //else
              //{
              //  UnHighlightField(frmObj.spPOA_year.style);
              //}
              /*
              if (frmObj.spPOA_phone01.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_phone01.id) + "\n";
                HighlightField(frmObj.spPOA_phone01.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_phone01.style);
              }
              if (frmObj.spPOA_phone02.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_phone02.id) + "\n";
                HighlightField(frmObj.spPOA_phone02.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_phone02.style);
              }
              if (frmObj.spPOA_phone03.value.length < 1)
              {
                errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_phone03.id) + "\n";
                HighlightField(frmObj.spPOA_phone03.style);
                blnReqFlds = true;                
              }
              else
              {
                UnHighlightField(frmObj.spPOA_phone03.style);
              }
            */
            }
            break;
          case "spPOA_phone10":
            frmObj.elements[i].value = frmObj.spPOA_phone01.value;
            if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
            {
              frmObj.spPOA_phone01.focus();
              blnReqFlds = true;
            }
            frmObj.elements[i].value = frmObj.spPOA_phone02.value + frmObj.spPOA_phone03.value;
            if (IndividualEdits('phone', frmObj.elements[i], true) == false)
            {
              frmObj.spPOA_phone02.focus();
              blnReqFlds = true;
            }
            if (blnReqFlds == false)
              frmObj.elements[i].value = frmObj.spPOA_phone01.value + frmObj.spPOA_phone02.value + frmObj.spPOA_phone03.value;
            break;
          default:
        }
      } 
      break;
    case "011":    
      frmObj = document.frmSect11;
      for (i=0; i<frmObj.length; i++)
      {
        switch (frmObj.elements[i].id)
        {
          case "yr_prepphone10":
            frmObj.elements[i].value = frmObj.yr_prepphone01.value;
            if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
            {
              frmObj.yr_prepphone01.focus();
              blnReqFlds = true;
            }
            frmObj.elements[i].value = frmObj.yr_prepphone02.value + frmObj.yr_prepphone03.value;
            if (IndividualEdits('phone', frmObj.elements[i], true) == false)
            {
              frmObj.yr_prepphone02.focus();
              blnReqFlds = true;
            }
            if (blnReqFlds == false)
              frmObj.elements[i].value = frmObj.yr_prepphone01.value + frmObj.yr_prepphone02.value + frmObj.yr_prepphone03.value;
            break;
          default:
        }
      }
      break;
    //case "012":
    //  frmObj = document.frmSect12;
    //  for (i=0; i<frmObj.length; i++)
    //  {
    //    switch (frmObj.elements[i].id)
    //    {
    //      case "sp_prepphone10":
    //        frmObj.elements[i].value = frmObj.sp_prepphone01.value;
    //        if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
    //        {
    //          frmObj.sp_prepphone01.focus();
    //          blnReqFlds = true;
    //        }
    //        frmObj.elements[i].value = frmObj.sp_prepphone02.value + frmObj.sp_prepphone03.value;
    //        if (IndividualEdits('phone', frmObj.elements[i], true) == false)
    //        {
    //          frmObj.sp_prepphone02.focus();
    //          blnReqFlds = true;
    //        }
    //        if (blnReqFlds == false)
    //          frmObj.elements[i].value = frmObj.sp_prepphone01.value + frmObj.sp_prepphone02.value + frmObj.sp_prepphone03.value;
    //        break;
    //    }
    //  }
    //  break;
    default:    
  }  
  
  if (blnReqFlds)
  {
    if (errmsg.length > 0)
      alert(errmsg);
  }
  return(blnReqFlds);
}

function GoSubmit(frmObj)
{
  if (RequiredFields(frmObj.hdnfrm.value) == false)
  {
    frmObj.submit();
  }
}

function popUp(url)
{
  sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
  self.name = "mainWin";
}

function AddPrepName(Obj)
{
  var typeObj = Obj.id;
  var frmObj = Obj.form;
  if (typeObj.substr(0, 2) == "yr")
  {
    frmObj.yr_prepname.value = frmObj.hdnPrepAppFirst.value + ' ' + frmObj.hdnPrepAppLast.value;
    frmObj.yr_prepphone01.value = frmObj.hdnPrepAppAC.value;
    frmObj.yr_prepphone02.value = frmObj.hdnPrepAppPhone.value.substr(0, 3);
    frmObj.yr_prepphone03.value = frmObj.hdnPrepAppPhone.value.substr(3, 4);
  }
  else
  {
    frmObj.sp_prepname.value = frmObj.hdnPrepSpFirst.value + ' ' + frmObj.hdnPrepSpLast.value;
    frmObj.sp_prepphone01.value = frmObj.hdnPrepSpAC.value;
    frmObj.sp_prepphone02.value = frmObj.hdnPrepSpPhone.value.substr(0, 3);
    frmObj.sp_prepphone03.value = frmObj.hdnPrepSpPhone.value.substr(3, 4);
  }
}
</script>
</head>
<body bgcolor=GhostWhite>

  <table border=0 cellpadding=0 cellspacing=0 width="600" align=center>
    <tr>
      <td width="50%" align=center>
        <img src="/images/NewColorLogo.gif" border=0
             align=absmiddle alt="First Health Services Corporation logo"
             title="First Health Services Corporation logo">
      </td>
      <td width="50%" align=center valign=middle>
        <img src="/images/PaPACE.gif" border=0
             align=absmiddle alt="Pennsylvania Department of Aging logo"
             title="Pennsylvania Department of Aging logo">
      </td>
    </tr>
    <tr>
      <td width="50%" valign=top nowrap>
        <b><font size=3 face="Arial">
        PACE/PACENET Enrollment</font></b>
      </td>
      <td width="50%" valign=top nowrap>
        <b><font size=2 face="Arial">
        Need Assistance?<br>
        Call: Inside PA <font color="Red">1-800-225-7223</font> Outside PA <font color="Red">717-651-3600</font><br>
        Email: <a href="mailto:PACECares@fhsc.com"
                  title="Email: PACECares@fhsc.com">PACECares@fhsc.com</a>
        </font></b>
      </td>
    </tr>
  </table>


  <form id="frmSect11" name="frmSect11" method=get
        enctype="multipart/form-data" action="PaceWizardDataSet.asp">
  <table border=2 cellpadding=0 cellspacing=0 width="600" bgcolor="#000066" align=center>
    <tr><td>
    <table border=0 cellpadding=0 cellspacing=0 width="100%" bgcolor="#000066" align=center>
      <tr>
        <td width="100%" colspan=3><br></td>
      </tr>
      <tr bgcolor="LightGrey">
        <td width="100%" colspan=3 valign=top>
          <font size=3><b>
          <input type="checkbox" id="yrprep_check" name="yrprep_check"
                 onClick="AddPrepName(this)">Check if same
          as Applicant</b></font>
        </td>
      </tr>
      <tr bgcolor="LightGrey">
        <td width="20%" nowrap><font size=3><b>Preparer's Name</b></font></td>
        <td width="80%" colspan=2 valign=bottom nowrap>
        <input id="yr_prepname" name="yr_prepname" size=30 maxlength=100>
        <font size=3><b>Preparer's Phone</b></font>
        (<input id="yr_prepphone01" name="yr_prepphone01" size=3 maxlength=3
                onKeyUp="AutoTabCheck(this, this.form)">)
         <input id="yr_prepphone02" name="yr_prepphone02" size=3 maxlength=3
                onKeyUp="AutoTabCheck(this, this.form)">-<input
                id="yr_prepphone03" name="yr_prepphone03" size=4 maxlength=4>
         <input type="hidden" id="yr_prepphone10" name="yr_prepphone10">
         <input type="hidden" id="hdnPrepAppLast" name="hdnPrepAppLast" value="Doe">
         <input type="hidden" id="hdnPrepAppFirst" name="hdnPrepAppFirst" value="John">
         <input type="hidden" id="hdnPrepAppAC" name="hdnPrepAppAC" value="215">
         <input type="hidden" id="hdnPrepAppPhone" name="hdnPrepAppPhone" value="5551212">
        </td>
      </tr>
      <tr>
        <td width="100%" align=center nowrap colspan=3><br>
        <font color="white" size=3><b>Please enter the Preparer's Name & Phone #.<br>
        When you are done, click on 'Continue'.<br></b></font>
        </td>
      </tr>
      <tr>
        <td width="100%" align=right nowrap colspan=3><br><br>      
        <input type="button" value="Continue" id=button2 name=button2
               onClick="Javascript:GoSubmit(document.frmSect11)">
        <input type="button" value="Cancel" id=button1 name=button1
               onClick="Javascript:CancelOutWizard()">
        <input type="hidden" value="011" id="hdnfrm" name="hdnfrm">
        <br><br>
        </td>
      </tr>
    </table>
    </td></tr>
  </table>
<!--

     <input type="hidden" id="hdnSpouse" name="hdnSpouse"
            value="2">
     <input type="hidden" id="hdnRecIDwr" name="hdnRecIDwr"
            value="45791">
     <input type="hidden" id="hdnMiscInfo" name="hdnMiscInfo"
            value="BFC">
  </form>
</body>
</html>
